package com.study;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * http://10.0.68.42:8040/actuator/routes 可以看到代理的服务
 * 如： /user-path/**: "sunxj-microservice-provider-user",
 *     /movie-path/**: "sunxj-microservice-consumer-movie-feign",
 *     /local/**: "forward:/hello"
 *
 *
 * 一、当没有zuul配置时：映射规则，path默认为:/serviceId/**   ====>默认用serviceId作为contentPath
 * 	http://127.0.0.1:8080/simple/1   等价于   http://127.0.0.1:8040/sunxj-microservice-provider-user/simple/1
 *
 *
 * 二、路由的配置应该有序加载，所以不能用.properties，只能用.yml
 */
@SpringBootApplication
//组合注解：注册到erueka：@EnableEurekaClient    所有请求子hystrix-command中执行：@EnableCircuitBreaker
@EnableZuulProxy
public class ZuulApp1 {
	
	public static void main(String[] args) {
		SpringApplication application = new SpringApplication(ZuulApp1.class);
		ConfigurableApplicationContext context = application.run(args);
		
		
		System.out.println("============end=======================");
	}

}
